package com.lyx.question.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lyx.question.dto.ThreeChapterInfo;
import com.lyx.question.entity.IndexOneSubject;
import com.lyx.question.dto.Indexchapter;
import com.lyx.question.entity.Subject;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 14667
 * @date 2022/7/20 10:52
 */
@Mapper
public interface SubjectMapper extends BaseMapper<Subject> {

    List<IndexOneSubject> selectRelationQuestionCount(@Param("id") Integer id);

//    List<Indexchapter> selectIndexChapterInfoById(@Param("id") Integer id);

    void updateBatch(@Param("chapterIds") List<Integer> chapterIds);

    List<Indexchapter> selectIndexChapterInfo();

    List<ThreeChapterInfo> getThreeChapterInfo(@Param("chapterId") Integer chapterId);

    List<ThreeChapterInfo> getThreeChapterInfoById(@Param("chapterId") Integer chapterId,@Param("userId") Integer userId);
}
